package org.stwy.custom;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.stwy.comm.base.BaseRecordsServiceImpl;

import com.rap.common.persistence.IBaseDAO;
import com.rap.common.exception.ServiceException;
import com.rap.common.service.BaseServiceImpl;

/**
 * 物业 服务类
 */
/**
*版权信息 (c) RAP 保留所有权利.
*@author Rap.Codegen
*@Team RAP Team
*@Date 2015-4-4 17:05:42
*<p></p>
*
*@参与人：Rap.Codegen
*/
 
@Service
@Transactional(rollbackFor=Exception.class)
public class CustomService extends BaseRecordsServiceImpl<CustomEntity, String> {

	@Autowired
	private CustomDAO dao;

	@Override
	protected IBaseDAO getDAO() {
		return dao;
	}

	@Override
	protected Long getLastCode() throws ServiceException {
		Long lastCode = dao.getLastCode();
		if(lastCode==null){
			lastCode=0L;
		}
		return lastCode;
	}

	@Override
	protected String[] getRecordAttrs() throws ServiceException {
		return new String[]{"theName"};
	}
}
